package com.sim.storage.enums

enum class FieldCode(val code: String, val description: String) {
    CODE_01("01", "Approval Code"),
    CODE_02("02", "Response Text"),
    CODE_03("03", "Transaction Date"),
    CODE_04("04", "Transaction Time"),
    CODE_16("16", "Terminal ID"),
    CODE_17("17", "Authorization ID"),
    CODE_21("21", "Host Random Number"),
    CODE_22("22", "Sequence Counter"),
    CODE_23("23", "SAM Random Number"),
    CODE_24("24", "SAM Cryptogram"),
    CODE_25("25", "Key Data"),
    CODE_26("26", "Host Cryptogram"),
    CODE_27("27", "C-MAC"),
    CODE_28("28", "Acquirer ID"),
    CODE_29("29", "CSN"),
    CODE_30("30", "Card Number"),
    CODE_31("31", "RFU4"),
    CODE_32("32", "LTA SAM ID"),
    CODE_33("33", "MID"),
    CODE_34("34", "Track 2 Data"),
    CODE_40("40", "Transaction Amount"),
    CODE_41("41", "Service Fee"),
    CODE_42("42", "Cash Back Amount"),
    CODE_43("43", "Loyalty Redemption"),
    CODE_46("46", "Fee Due to Merchant"),
    CODE_47("47", "Fee Due from Merchant"),
    CODE_48("48", "Cash Deposit Net Fee"),
    CODE_49("49", "Cash Deposit Fee"),
    CODE_50("50", "Batch Number"),
    CODE_65("65", "STAN"),
    CODE_70("70", "GroupRID Listing"),
    CODE_71("71", "GroupRID"),
    CODE_72("72", "Promotion Data"),
    CODE_73("73", "Item Code"),
    CODE_74("74", "Item Count"),
    CODE_75("75", "Merchant Dollar Denomination"),
    CODE_76("76", "Item Count Before"),
    CODE_77("77", "Merchant Dollar Denomination Before"),
    CODE_78("78", "Item Count Final"),
    CODE_79("79", "Merchant Dollar Denomination Final"),
    CODE_7A("7A", "Card Data"),
    CODE_80("80", "Detect Timeout"),
    CODE_81("81", "Status Word"),
    CODE_82("82", "Card Random Number"),
    CODE_83("83", "Authentication Data"),
    CODE_84("84", "Authentication Key ID"),

    CODE_85("85", "File ID"),
    CODE_86("86", "Data Read / Write"),
    CODE_87("87", "Expected Data Size"),
    CODE_93("93", "Loyalty Type"),
    CODE_94("94", "Loyalty Information"),
    CODE_9A("9A", "AID (EMV)"),
    CODE_9B("9B", "Application Profile (EMV)"),
    CODE_9C("9C", "CID (EMV)"),
    CODE_9D("9D", "Transaction Certificate (EMV)"),
    CODE_9E("9E", "TVR (EMV)"),
    CODE_9F("9F", "TSI (EMV)"),
    CODE_9G("9G", "Acquirer Name"),
    CODE_9H("9H", "Invoice Number"),
    CODE_91("91", "POSID"),
    CODE_9J("9J", "Number of Credit Host"),
    CODE_9K("9K", "Host ID"),
    CODE_9L("9L", "Number of DCC Host"),
    CODE_9M("9M", "Card Type"),
    CODE_9N("9N", "Data Type"),
    CODE_9O("9O", "Currency Code"),
    CODE_9P("9P", "Number of IPP Host"),
    CODE_9Q("9Q", "Scheme Category"),
    CODE_BO("BO", "Block Reason Code"),
    CODE_B1("B1", "Block Message"),
    CODE_C0("C0", "Trans Data"),
    CODE_C1("C1", "CEPAS Version"),
    CODE_C2("C2", "Expiry Date"),
    CODE_C3("C3", "CAN Status"),
    CODE_C4("C4", "Date of Birth"),
    CODE_C5("C5", "CAN Entry Mode"),
    CODE_06("06", "NRIC"),
    CODE_C7("C7", "Selected ATU Amount"),
    CODE_C8("C8", "Existing ATU Amount"),
    CODE_C9("C9", "Card Presence"),

    CODE_CA("CA", "Contact Number"),
    CODE_CB("CB", "Allow Unblock"),
    CODE_CC("CC", "Allow Payment"),
    CODE_CD("CD", "Notify of Purpose"),
    CODE_CE("CE", "Notify of Reason"),
    CODE_CF("CF", "Comment"),
    CODE_CG("CG", "Activation Code"),
    CODE_CH("CH", "Customer ID, Country"),
    CODE_CI("CI", "Customer ID, Type"),
    CODE_CJ("CJ", "Customer ID"),
    CODE_CK("CK", "Credit Card Number"),
    CODE_CL("CL", "Insurance Flag"),
    CODE_CM("CM", "Retailer Reference Number"),
    CODE_CN("CN", "Card Entry Mode"),


    CODE_CO("CO", "Card Option"),
    CODE_CP("CP", "Transaction Status"),

    CODE_CQ("CQ", "Card Entry Mode 2"),
    CODE_D0("D0", "Merchant Name And Address"),
    CODE_D1("D1", "Merchant ID"),
    CODE_D2("D2", "Card Issuer Name"),
    CODE_D3("D3", "Retrieval Reference Number"),
    CODE_D4("D4", "RFU2"),
    CODE_D5("D5", "Signature Required"),
    CODE_D6("D6", "Card Holder Name"),
    CODE_D7("D7", "Processing Gateway"),
    CODE_D8("D8", "Card Description"),
    CODE_E0("E0", "Chip Data"),
    CODE_E2("E2", "MPP Host Text"),
    CODE_E3("E3", "Address 1"),
    CODE_E4("E4", "Address 2"),
    CODE_E5("E5", "Address 3"),
    CODE_E6("E6", "Address 4"),
    CODE_E7("E7", "Postal Code"),
    CODE_E8("E8", "MPP Card Number"),
    CODE_E9("E9", "MPP Card Program"),
    CODE_EA("EA", "Transaction Reference Number (Timestamp)"),
    CODE_EB("EB", "MPP Final Balance"),
    CODE_EC("EC", "MPP Expiry Date"),
    CODE_ED("ED", "Previous Balance"),
    CODE_EE("EE", "Current Balance"),
    CODE_EF("EF", "Previous Balance Negative Indicator"),
    CODE_EG("EG", "Current Balance Negative Indicator"),
    CODE_FO("FO", "Foreign MID"),
    CODE_F1("F1", "Issuer Category"),
    CODE_F2("F2", "Currency Name"),
    CODE_F3("F3", "Plan Code"),
    CODE_F4("F4", "Tenure"),
    CODE_F5("F5", "First Amount"),
    CODE_F6("F6", "Monthly Amount"),
    CODE_F7("F7", "Last Amount"),
    CODE_F8("F8", "Interest Amount"),
    CODE_FA("FA", "Foreign Amount"),
    CODE_GO("GO", "Sale Total Amount"),
    CODE_G1("G1", "Total NETS Purchase Amount"),
    CODE_G2("G2", "Total VOID NETS Purchase Amount"),
    CODE_G3("G3", "Total UnionPay Purchase Amount"),
    CODE_G4("G4", "Total VOID UnionPay Purchase Amount"),
    CODE_G5("G5", "Total UnionPay Refund Amount"),
    CODE_G6("G6", "Total UnionPay Pre-Auth Completion Amount"),
    CODE_G7("G7", "Total VOID UnionPay Pre-Auth Completion Amount"),
    CODE_G8("G8", "Total BCA Purchase Amount"),
    CODE_G9("G9", "Total VOID BCA Purchase Amount"),
    CODE_GA("GA", "Total BCA Pre-Auth Completion Amount"),
    CODE_GB("GB", "Total NFP Purchase Amount"),
    CODE_GC("GC", "Total NCC Purchase Amount"),
    CODE_GD("GD", "Total NFP Topup (NETS) Amount"),

    CODE_GE("GE", "Total NCC Topup (NETS) Amount"),
    CODE_GF("GF", "Total Cashback Amount"),
    CODE_GG("GG", "Total Cash Deposit Amount"),
    CODE_GH("GH", "Total NPC Topup (NETS) Amount"),
    CODE_GI("GI", "Total NPC Topup (CASH) Amount"),
    CODE_GK("GK", "Reserved For Future Use"),
    CODE_H4("H4", "ECR Reference Number"),
    CODE_H5("H5", "Terminate Certificate (TTC Cert.)"),
    CODE_H6("H6", "STAN"),
    CODE_H7("H7", "CashCard Transaction Counter (CTC)"),
    CODE_H8("H8", "BlackList Version"),
    CODE_H9("H9", "Certificate (Sing Certificate)"),
    CODE_HA("HA", "Checksum"),
    CODE_HB("HB", "RFU8"),
    CODE_HC("HC", "Host Response Code"),
    CODE_HD("HD", "Enhanced ECR Reference Number"),
    CODE_HE("HE", "Card Balance"),
    CODE_L1("L1", "Loyalty Program Name"),
    CODE_L2("L2", "Loyalty Type"),
    CODE_L3("L3", "Redemption Value"),
    CODE_L4("L4", "Current Balance"),
    CODE_L5("L5", "POS Message"),
    CODE_L6("L6", "Loyalty Marketing Message"),
    CODE_L7("L7", "Card Name"),
    CODE_L8("L8", "Loyalty Program Exp Date"),
    CODE_L9("L9", "Loyalty Marketing Message"),
    CODE_N0("N0", "Sale Total Count"),
    CODE_N1("N1", "Total NETS Purchase Count"),
    CODE_N2("N2", "Total VOID NETS Purchase Count"),
    CODE_N3("N3", "Total UnionPay Purchase Count"),
    CODE_N4("N4", "Total VOID UnionPay Purchase Count"),
    CODE_N5("N5", "Total UnionPay Refund Count"),
    CODE_N6("N6", "Total UnionPay Pre-Auth Completion Count"),
    CODE_N7("N7", "Total VOID UnionPay Pre-Auth Completion Count"),
    CODE_N8("N8", "Total BCA Purchase Count"),
    CODE_N9("N9", "Total VOID BCA Purchase Count"),
    CODE_NA("NA", "Total BCA Pre-Auth Completion Count"),
    CODE_NB("NB", "Total NFP Purchase Count"),
    CODE_NC("NC", "Total NCC Purchase Count"),
    CODE_ND("ND", "Total NFP Topup (NETS) Count"),
    CODE_NE("NE", "Total NCC Topup (NETS) Count"),
    CODE_NF("NF", "Total Cashback Count"),
    CODE_NG("NG", "Total Cash Deposit Count"),
    CODE_NH("NH", "Total NPC Topup (NETS) Count"),
    CODE_NI("NI", "Total NPC Topup (CASH) Count"),
    CODE_NK("NK", "Total NPC Activation Count"),
    CODE_M0("M0", "Callback Function Type"),
    CODE_M1("M1", "Message Index"),
    CODE_M2("M2", "Message"),
    CODE_M3("M3", "Number of Selection"),

    CODE_M4("M4", "Selection Index"),
    CODE_M5("M5", "Selection Label"),
    CODE_ME("ME", "Selection Name (Group name)"),
    CODE_M7("M7", "Message Payload to be sent or received from host"),
    CODE_M8("M8", "Mobile Name"),
    CODE_MN("MN", "Mobile Number"),
    CODE_O1("O1", "Offline Txn Type"),
    CODE_PO("PO", "Parameter List"),
    CODE_P1_PZ("P1-PZ", "Reserved for parameter items"),
    CODE_R0("R0", "Response Message I"),
    CODE_R1("R1", "Response Message II"),
    CODE_RP("RP", "Receipt Text Format"),
    CODE_RQ("RQ", "Signature image in bitmap format"),
    CODE_SO("SO", "Card Status"),
    CODE_S1("S1", "Block Status"),
    CODE_S2("S2", "ATU Status"),
    CODE_S3("S3", "Purse Status"),
    CODE_S4("S4", "Record Index"),
    CODE_S5("S5", "Number of Record"),
    CODE_S6("S6", "Maximum Transaction Log"),
    CODE_S7("S7", "Number of Records Read"),
    CODE_S8("S8", "Transaction Logs"),
    CODE_S9("S9", "Max Transaction Log Count"),
    CODE_SA("SA", "NETS Host status"),
    CODE_SB("SB", "UPI Host status"),
    CODE_SC("SC", "UPOS Host status"),
    CODE_SD("SD", "RSVP Host status"),
    CODE_SE("SE", "Merchant Prepaid Host status"),
    CODE_T1("T1", "Top-up Option"),
    CODE_T2("T2", "Transaction Type Indicator"),
    CODE_T3("T3", "Transaction Specific Data"),
    CODE_T4("T4", "ATU Debt Amount"),
    CODE_T5("T5", "Payment Type"),
    CODE_ZA("ZA", "Total Fee (Top-up)"),
    CODE_ZB("ZB", "Fee due to Merchant (Top-up)"),
    CODE_ZC("ZC", "Fee due from Merchant (Top-up)"),
    CODE_ZD("ZD", "Card Expiry"),
    CODE_ZE("ZE", "Advertising Message"),
    CODE_ZF("ZF", "Software Version"),
    CODE_ZG("ZG", "Black List Version"),
    CODE_ZH("ZH", "Parameter Version"),
    CODE_ZI("ZI", "Block List Version"),
    CODE_ZJ("ZJ", "Response Code (Top Up)"),
    CODE_ZK("ZK", "Response Text (Top Up)"),
    CODE_ZP("ZP", "Purchase Fee"),
    CODE_ZT("ZT", "Additional GB Information"),
    CODE_A1("A1", "Transaction ID"),
    CODE_9I("9I", "POS ID"),

    CODE_ZY("ZY", "Transaction Code");

    companion object {
        fun fromCode(code: String): String {
            return values().find { it.code == code }?.description ?: code
        }
    }
}
